package org.hefan.sysmanager.service.impl;

import org.hefan.basic.service.impl.BaseServiceImpl;
import org.hefan.sysmanager.domain.SystemDictionaryDetail;
import org.hefan.sysmanager.mapper.SystemDictionaryDetailMapper;
import org.hefan.sysmanager.service.ISystemDictionaryDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class SystemDictionaryDetailServiceImpl extends BaseServiceImpl<SystemDictionaryDetail> implements ISystemDictionaryDetailService {

    @Autowired
    private SystemDictionaryDetailMapper systemDictionaryDetailMapper;

    @Override
    public void save(SystemDictionaryDetail systemDictionaryDetail) {
        systemDictionaryDetail.setTypes_id(systemDictionaryDetail.getSystemDictionaryType().getId());
        systemDictionaryDetailMapper.save(systemDictionaryDetail);
    }

    @Override
    public void update(SystemDictionaryDetail systemDictionaryDetail) {
        systemDictionaryDetail.setTypes_id(systemDictionaryDetail.getSystemDictionaryType().getId());
        systemDictionaryDetailMapper.update(systemDictionaryDetail);
    }
}
